<!-- 课程详情 -->
<template>
	<view class="content">
		<view class="nav">
			<view class="nav_item" v-for="(value,index) in navList" :key="index" @click="gotoitem(index)">
				<view class="nav_item_top">{{value.name}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: uni.getStorageSync('courseCont'), //课程相关数据
				navList: [{
						name: '评价',
						num: 0,
						lable: '次',
					},
					{
						name: '慧练',
						num: 0,
						lable: '题',
					},
					{
						name: '资源',
						num: 0,
						lable: '条',
					},
					{
						name: '笔记',
						num: 0,
						lable: '条',
					}
				]
			}
		},
		onLoad() {
			uni.setNavigationBarTitle({
				title: this.data.subject_name
			})
		},
		methods: {
			gotoitem(index) {
				switch (index) {
					case 0:
						uni.navigateTo({
							url: 'courseevaluate'
						});
						break;
					case 1:
						uni.navigateTo({
							url: 'practise'
						});
						break;
					case 2:
						uni.navigateTo({
							url: 'resources_list'
						});
						break;
					case 3:
						uni.navigateTo({
							url: './note-detail'
						});
						break;
					default:
						break;
				}
			}
		},
		filters: {
			// 从返回过来的创建时间后面的时间来作为回复时间
			getReply(value) {
				return value.match(/\d+:\d+/g).toString()
			}
		}

	}
</script>

<style lang="scss">
	.content {
		position: absolute;
		width: 100%;
		height: 100%;
		background: rgba(250, 250, 250, 1);
	}

	.nav {
		width: 100%;
		height: 120upx;
		background:rgba(255,153,0,1);
		display: flex;
		justify-content: space-between;
		position: fixed;
		z-index: 999;

		.nav_item {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			margin: auto;

			.nav_item_top {
				color: #FFFFFF;
				font-size: 32upx;
			}

			.nav_item_bottom {
				color: #FFFFFF;
				display: flex;
				justify-content: center;

				.left {
					font-size: 32upx;
				}

				.rigth {
					font-size: 24upx;
					margin-left: 3upx;
					padding-top: 10upx;
				}
			}
		}
	}

	.item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 92%;
		height: 140upx;
		margin: auto;
		margin-top: 20upx;
		background: rgba(255, 255, 255, 1);
		box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.06);
		border-radius: 16upx;

		.itme_left {
			display: flex;
			justify-content: flex-start;

			.head_img {
				width: 88upx;
				height: 88upx;
				margin-left: 26upx;

				image {
					width: 100%;
					height: 100%;
					border-radius: 50%;
				}
			}

			.text {
				display: flex;
				flex-direction: column;
				margin-left: 15upx;

				.name {
					color: #333333;
					font-size: 34upx;
				}

				.label {
					display: flex;
					justify-content: flex-start;

					.label_time {
						color: #999999;
						font-size: 26upx;
						margin-right: 10upx;
					}

					.label_text {
						color: #00D5A2;
						font-size: 26upx;
					}
				}
			}

		}

		.item_right {
			i {
				font-size: 50upx;
				margin-right: 40upx;
				color: rgba(0, 213, 162, 1);
			}
		}
	}

	.item:last-child {
		margin-bottom: 50upx !important;
	}

	.news {
		position: fixed;
		right: 48upx;
		bottom: 62upx;
		width: 100upx;
		height: 100upx;
		border-radius: 50%;
		background: linear-gradient(317deg, rgba(104, 229, 131, 1) 0%, rgba(32, 204, 157, 1) 100%);
		box-shadow: 0px 4px 14px rgba(14, 155, 111, 0.48);
		text-align: center;
		line-height: 100upx;

		i {
			color: #FFFFFF;
			font-size: 60upx;
		}
	}

	.not_data {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;

		i {
			margin-top: 270upx;
			font-size: 370upx;
			line-height: 340upx;
			color: rgba(194, 194, 194, 1);
		}

		.not_data_text {
			color: #999999;
			font-size: 42upx;
			line-height: 40upx;
			margin-top: 15upx;
			margin-left: 25upx;
		}

	}

	.list {
		position: relative;
		top: 120upx;
	}
</style>
